package v1

import (
	"net/http"
	"toy-car/pkg/e"

	"toy-car/pkg/util"

	"github.com/gin-gonic/gin"
)

func TestEmail(c *gin.Context) {

	data := make(map[string]interface{})
	code := e.SUCCESS

	err := util.Email("si@126.com", "nihao", "woshibody")
	if err != nil {
		code = e.ERROR
	}
	c.JSON(http.StatusOK, gin.H{
		"code": code,
		"msg":  e.GetMSG(code),
		"data": data,
	})
}
